<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    
    <%@ page import="beans.Servicos" %>
    <%@ page import="DAO.ServicoDAO" %>
    <%@ page import="beans.Prestador" %>
    
    <%
    //CRIACAO DO NOVO OBJETO SERVICO
    Servicos novoServico = new Servicos();
    Prestador prestador = (Prestador) session.getAttribute("prestador");
    //LEITURA DAS INFORMACOES DO FORMULARIO
    novoServico.setCdPrestador(prestador.getCdPrestador());
    novoServico.setServicoNome(request.getParameter("nome-servico"));
    novoServico.setServicoPreco(request.getParameter("preco-servico"));
    //CARGA DAS INFORMACOES NO BANCO
    novoServico.cadastrarServico();
    //ENCAMINHAR PARA PAINEL DO PRESTADOR
    String redirectURL = "../HTML/painelPrestador.html";
	response.sendRedirect(redirectURL);
    %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Cadastrando...</title>
</head>
<body>

</body>
</html>